
<%@ page import="givenchy.TaskGroup" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'taskGroup.label', default: 'TaskGroup')}" />
        <title>任务组列表</title>

    </head>
    <body>
        <div class="tasknav">
            <span class="menuButton"><g:link class="create" action="create">添加任务组</g:link></span>
        </div>
        <div class="body">
            <h1>任务组列表</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <div class="list">
                <table>
                    <thead>
                        <tr>
                            <th>名称</th>
                        
                            <th>描述</th>

                            <th>广告</th>

                            <th>IP质量</th>
                          
                            <th>时间限定</th>

                            <th></th>
                        </tr>
                    </thead>
                    <tbody>
                    <g:each in="${taskGroupInstanceList}" status="i" var="taskGroupInstance">
                        <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
                            <td>${fieldValue(bean: taskGroupInstance, field: "name")}</td>                        
                            <td>${fieldValue(bean: taskGroupInstance, field: "description")}</td>
                            <td><g:formatBoolean boolean="${taskGroupInstance.isAd}" true="是" false="否" /></td>
                            <td>${ taskGroupInstance.requireOfIP}</td>
                            <td><a href="javascript:" rel="tipsy" title="${taskGroupInstance.hourRateToString()}">时间限定<a/></td>
                            <td>
                                <g:link controller="task" action="create"  id="${taskGroupInstance.id}">添加任务</g:link>|
                                <g:link controller="task" action="index" id="${taskGroupInstance.id}">任务列表</g:link>|
                                <g:link action="edit" id="${taskGroupInstance.id}">修改</g:link>|                                             
                                <g:link action="delete" id="${taskGroupInstance.id}" onclick="return confirm('确定删除此任务组吗?');">删除</g:link>                        
                            </td>
                        </tr>
                    </g:each>
                    </tbody>
                </table>
            </div>
            <div class="paginateButtons">
                <g:paginate total="${taskGroupInstanceTotal}" />
            </div>
        </div>



    </body>
</html>
